package com.masterclient.app.businessmodule.homemodule.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.eoner.baselibrary.utils.GlideUtil;
import com.eoner.baselibrary.utils.ScreenUtils;
import com.eoner.baselibrary.utils.ViewTransformUtil;
import com.masterclient.app.R;
import com.masterclient.app.modules.income.model.HomeDataBean;

import java.util.List;

import jp.wasabeef.glide.transformations.CropCircleWithBorderTransformation;

public class TabItemAdapter extends BaseQuickAdapter<HomeDataBean.HomeAdsItem, BaseViewHolder> {


    public TabItemAdapter(@Nullable List<HomeDataBean.HomeAdsItem> data) {
        super(R.layout.tab_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HomeDataBean.HomeAdsItem item) {
        ImageView iv = helper.getView(R.id.sh_temporary_img);
        TextView tv = helper.getView(R.id.tv_title);
        tv.setText(item.name);
        ViewTransformUtil.glideImageView(mContext, item.banner,iv,
                new CropCircleWithBorderTransformation(0,0x0A3D2529), R.mipmap.user_head_default_icon);
    }
}
